Cookie

interface Cookie

An HTTP cookie.

Types

Link copied to clipboard
class Builder
A builder of Cookie.

Functions

Link copied to clipboard
Returns the cookie creation time since UNIX epoch.
Link copied to clipboard
open fun domain(): String
Returns a string that represents the domain name of this cookie, or an empty string if the domain name for this cookie is not specified.
Link copied to clipboard
Returns the cookie expiration time since UNIX epoch.
Link copied to clipboard
open fun isHttpOnly(): Boolean
Returns true if the cookie is considered HTTP only.
Link copied to clipboard
open fun isSecure(): Boolean
Returns true if the cookie is restricted to a secure protocol (HTTPS or WSS) or false if it can be sent using any protocol.
Link copied to clipboard
open fun name(): String
Returns a string that represents the name of this cookie, or an empty string if the cookie name is not specified.
Link copied to clipboard
open fun newBuilder(domain: String): Cookie.Builder
Creates a new Cookie builder.
Link copied to clipboard
Returns the partition key if the cookie has the independent partitioned state.
Link copied to clipboard
open fun path(): String
Returns a string that represents the path that must exist in the URL of a request in order to send this cookie to the server.
Link copied to clipboard
open fun sameSite(): SameSite
Returns the SameSite cookie attribute value.
Link copied to clipboard
open fun value(): String
Returns a string that represents the value of this cookie, or an empty string if the cookie value is not specified.